package com.hup.utils.swing.model;

import lombok.Getter;

import javax.swing.DefaultButtonModel;
import javax.swing.JComponent;
import java.awt.Container;

/**
 * @author hugan
 * @date 2022/8/10
 */
public class ButtonModelMulti extends DefaultButtonModel {

    @Getter
    private final JComponent component;

    public ButtonModelMulti(JComponent component) {
        this.component = component;
    }

    public Container getParent() {
        return component.getParent();
    }

    public int getComponentZOrder() {
        return component.getParent().getComponentZOrder(component);
    }

}
